export const curry = (fn, arr = []) => (...args) => (
    arg => arg.length === fn.length ?
    fn(...arg) :
    curry(fn, arg)
)([...arr, ...args]);

export const compose = (...args) => args.reduce((prev, current) => (...values) => prev(current(...values)));